package org.springside.modules.web.struts2;

import java.util.List;
import java.util.Map;

/**
 * Manager的CRUD方法调用者. 大家可定制不同的方法命名策略.
 */
@SuppressWarnings("unchecked")
public interface CRUDInvoker
{
	public List getAll(final Object manager, final String entityClassName, final int[] rowStartIdxAndCount) throws Exception;
 
	public List getAllByPropertysWith(final Object manager, final String entityClassName, final Map<String, String> propertys,
			final int... rowStartIdxAndCount) throws Exception;

	public void create(final Object manager, final Class entityClass, final Object entity) throws Exception;

	public void update(final Object manager, final Class entityClass, final Object entity) throws Exception;

	public void delete(final Object manager, final String entityClassName, final Object id) throws Exception;

	public Long getCount(final Object manager, final String entityClassName,final Map<String, String> propertys) throws Exception;

}
